<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="brandDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='brandDetail.heading'/>"/>
</head>

<s:form id="brandForm" action="saveBrand" method="post" validate="true" enctype="multipart/form-data" >
    <li style="display: none">
        <s:hidden key="brand.id"/>
    </li>
    <s:textfield key="brand.name" required="true" maxlength="100" cssClass="text medium"/>
    <s:radio key="brand.companyType" theme="xhtml" required="true"
         list="#{
         '0':getText('brand.companyType.type0'),
         '1':getText('brand.companyType.type1'),
         '2':getText('brand.companyType.type2'),
         '3':getText('brand.companyType.type3'),
         '4':getText('brand.companyType.type4'),
         '5':getText('brand.companyType.type5'),
         '6':getText('brand.companyType.type6'),
         '7':getText('brand.companyType.type7')}"/>

    <s:file key="brand.logo" name="file" cssClass="text file button" required="false" />
    <c:if test="${not empty brand.logo}">
        <img src="${brand.logo}"/>
    </c:if>

    <s:textfield key="brand.yearEstablished" required="false" maxlength="50" cssClass="text medium"/>
    <s:textfield key="brand.headquarters" required="false" maxlength="254" cssClass="text medium"/>
    <s:textfield key="brand.ceo" required="false" maxlength="50" cssClass="text medium"/>
    <s:textfield key="brand.industry" required="false" maxlength="254" cssClass="text medium"/>
    
    <s:textfield key="brand.marketValue" required="false" maxlength="50" cssClass="text medium"/>
    <s:textfield key="brand.annualSalesProfit" required="false" maxlength="50" cssClass="text medium"/>
    <s:textfield key="brand.annualSalesVolume" required="false" maxlength="50" cssClass="text medium"/>

    <s:textfield key="brand.numbeOfEmployees" required="false" maxlength="50" cssClass="text medium"/>
    <s:textfield key="brand.numberOfCustomer" required="false" maxlength="50" cssClass="text medium"/>
    <s:textfield key="brand.phone" required="false" maxlength="50" cssClass="text medium"/>
    <s:textfield key="brand.website" required="false" maxlength="100" cssClass="text medium"/>

    <s:textfield key="brand.version" required="false" maxlength="255" cssClass="text medium" readonly="true"/>
    <s:textarea key="brand.description" required="false" maxlength="254" cssClass="textarea medium"/>
    <s:textarea key="brand.comments" required="false" maxlength="254" cssClass="textarea medium"/>

    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty brand.id}">
            <s:submit cssClass="button" method="delete" key="button.delete"
                onclick="return confirmDelete('Brand')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>
</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("brandForm"));
</script>
